From 48f902c059c84c1630b752cae00333814a96482a Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 14 Jan 2011 15:18:02 +0000 Subject: [PATCH] x86 hvm: Do not check-and-fail on in_atomic() in hvm_copy(). Stub this out for 4.0, as PV-on-HVM drivers hit this case when performing grant-table hypercalls. Grant-table code currently accesses guest memory under bug per-domain lock. The test in hvm_copy() is not necessary until the xenpaging implementation is more complete, which will not now be until after 4.1.0. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/hvm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 62c018fa44..1a89bfb575 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1993,12 +1993,21 @@ static enum hvm_copy_result __hvm_copy( char *p; int count, todo = size; + /* + * XXX Disable for 4.1.0: PV-on-HVM drivers will do grant-table ops + * such as query_size. Grant-table code currently does copy_to/from_guest + * accesses under the big per-domain lock, which this test would disallow. + * The test is not needed until we implement sleeping-on-waitqueue when + * we access a paged-out frame, and that's post 4.1.0 now. + */ +#if 0 /* * If the required guest memory is paged out, this function may sleep. * Hence we bail immediately if called from atomic context. */ if ( in_atomic() ) return HVMCOPY_unhandleable; +#endif while ( todo > 0 ) { -- 2.30.2